<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>新增人员</title>
 <%@ include file="/page/include.jsp" %>
</head>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/statics/plugins/bootstrap-switch/bootstrap-switch.min.css" />
</style>
<body class="nav-md" style="background-color: #f7f7f7">
	<div class="container body">
		<div class="main_container">
			<div class="framebody" style="min-height: 100%;" role="main">
				<div class="x_panel"> 
					<div class="x_content">
						<form class="form-horizontal form-label-left" novalidate id="customerInfoForm"  method="post" action="${pageContext.request.contextPath}/customer/saveOrUpdateCustomer">
							<input type="hidden"  id="id" name="id" value="${customer.id }" >
							<input type="hidden"  id="companyId" name="companyId" value="${customer.companyId }" >
							<div class="item form-group">
								<label class="control-label col-md-1 col-sm-1 col-xs-12 form-item-label-100" for="mobile"><span class="required">*</span>手机号码: 
								</label>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<input id="mobile" name="mobile" value="${customer.mobile }" class="form-control col-md-3 col-xs-12" placeholder="手机号码"  type="text"  <c:if test="${opFlag eq 'edit' }">readonly</c:if> >
									<label class="control-label" style="color:red;font-weight:400;">手机号码即为登录账号，初始密码为123456</label>
								</div>
							</div>
							<div class="item form-group">
								<label class="control-label col-md-1 col-sm-1 col-xs-12 form-item-label-100" for="userName"><span class="required">*</span>姓名: 
								</label>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<input id="userName" name="userName" value="${customer.userName }" class="form-control col-md-3 col-xs-12" placeholder="姓名"  type="text">
								</div>
							</div>
							<div class="item form-group">
								<label class="control-label col-md-1 col-sm-1 col-xs-12 form-item-label-100" for="qqNumber">QQ: 
								</label>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<input id="qqNumber" name="qqNumber" value="${customer.qqNumber }" class="form-control col-md-3 col-xs-12" placeholder="QQ"  type="text">
								</div>
							</div>
							<div class="item form-group">
								<label class="control-label col-md-1 col-sm-1 col-xs-12 form-item-label-100" for="mobile">邮箱: 
								</label>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<input id="email" name="email" value="${customer.email }" class="form-control col-md-3 col-xs-12" placeholder="邮箱"  type="text">
									<label class="control-label" style="font-weight:400;">忘记密码时可以通过邮箱找回密码</label>
								</div>
							</div>
							<div class="item form-group">
								<label class="control-label col-md-1 col-sm-1 col-xs-12 form-item-label-100" for="wechat">微信: 
								</label>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<input id="wechat" name="wechat" value="${customer.wechat }" class="form-control col-md-3 col-xs-12" placeholder="微信"  type="text">
								</div>
							</div>
							<div class="item form-group">
								<label class="control-label col-md-1 col-sm-1 col-xs-12 form-item-label-100" >性别: 
								</label>
								<div class="col-md-3 col-sm-3 col-xs-12">
									<label class="control-label" for="gender"><input type="radio" name="gender" value="1" <c:if test="${customer.gender eq '1' }">checked</c:if> <c:if test="${empty customer.gender }">checked</c:if> class="form-control" /> 男</label>
									&nbsp;&nbsp;
									<label class="control-label" for="gender"><input type="radio" name="gender" value="2" <c:if test="${customer.gender eq '2' }">checked</c:if> class="form-control" /> 女</label>
								</div>
							</div>
							<div class="item form-group">
								<label class="control-label col-md-1 col-sm-1 col-xs-12 form-item-label-100" >商品详情页面调价权限: 
								</label>
								<div class="col-md-3 col-sm-3 col-xs-12">
									<select class="selectpicker form-control col-md-12"
										id="adjustPriceAuth" name="adjustPriceAuth">
										<option value="0" ${customer.adjustPriceAuth == "0" ? "selected" : "" }>不允许</option>
										<option value="1" ${customer.adjustPriceAuth == "1" ? "selected" : "" }>允许</option>
									</select> 
								</div>
							</div>
							<div class="item form-group">
								<label class="control-label col-md-1 col-sm-1 col-xs-12 form-item-label-100" >
								</label>
								<div class="col-md-5 col-sm-5 col-xs-12">
									<label class="control-label" for="defaultFlag"><input type="checkbox" name="defaultFlag" value="<c:if test='${empty customer.defaultFlag }'>0</c:if>" <c:if test="${customer.defaultFlag eq '1' }">checked</c:if> class="form-control" /> 设置为默认联系人</label>
								</div>
							</div>
						</form>
						
						<div class="row" style="padding-left:120px;padding-top:20px;width:55%;"> 
							<div class="row" style="padding-bottom: 10px;">
								<a class="btn btn-success btn-sm" id="btnAdd_customField"><i class="fa fa-plus fa-fw"></i>添加自定义属性</a>
								<input type="hidden" id="tmpFieldId" />
								<input type="hidden" id="tmpFieldType" />
								<input type="hidden" id="tmpFieldName" />
								<input type="hidden" id="tmpFieldValue" />
							</div>
							<div class="row">
								<table id="customerExternalTable" class="table"></table>
							</div>
						</div>
						
						<div class="form-btn-content">
							<a id="btnSave" class="btn btn-primary">保存</a>
							<a id="btnCancel" class="btn btn-default">取消</a>
						</div>
					</div>
				</div>
			</div>
		</div>
		<input type="hidden" id="layer_opt_status" />
	</div>
<script type="text/javascript"  src="${rootPath}/js/customer/customer_form.js"></script>
</body>
</html>